package com.chat.mapper;

import com.chat.entity.Message;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 消息Mapper
 */
public interface MessageMapper {
//
    List<Message> selectMessageByUser(int userId);

    List<Message> selectMessageByRoom(int roomId);

    List<Message> selectMessageByUserAndRoom(@Param(value = "roomId") int roomId,@Param(value = "userId")int userId);

    void insertMessage(Message message);

}
